<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{commons/public::common-public}">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
</head>
<body>
<!--图标-->

<div class="container-fluid">
  <div class="row">
    <div class="col-md-2 justify-content-between cbl" th:include="~{commons/header::common-header}" style="margin:0;padding:0;">
    </div>
    <!-- 右部分 -->
    <div class="col-md-10 bg3">
      <div class="content2">
        <div class="search">
          <nav class="navbar navbar-expand-lg bg-#000000" data-bs-theme="dark">
            <div class="container-fluid">
              <a class="navbar-brand" href="#">YUEDU</a>
              <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
                      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
              </button>
              <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                  <li class="nav-item">
                    <a class="nav-link" href="#">阅读统计</a>
                  </li>

                  <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="article-manager.html" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                      评分统计
                    </a>
                  </li>

                </ul>
                <form class="d-flex" role="search">
                  <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
                  <button class="btn btn-outline-success" type="submit">Search</button>
                </form>
              </div>
            </div>
          </nav>
        </div>
        <!-- 主要内容-->
        <div class="main col-md-12 justify-content-center" style=";height: 800px;">
          <div class="row" style="height: 10px;"></div>
          <div class="row">
          <!--  <div class="col-md-2"></div>-->
            <div class="col-md-8 tjk">
              <form th:action="@{/questions/edit/{questionID}(questionID=${question.questionID})}" method="post" th:object="${question}">
                <h3 style="text-align: center;font-family: 楷体;font-size: 30px;font-weight: bolder;color: white;">编辑问题</h3>
                <input type="hidden" name="_csrf" value="${_csrf.token}"/>
                <div style="margin-top: 10px;">
                <label for="articleID"style="color: #ed8f87;">所属文章:</label>
                  <input  name="id" th:value="${question.articleID}" >
                </div>
                <div style="margin-top: 10px;">
                <label for="articleID"style="color: #ed8f87;">问题id:</label>
                <input  name="id" th:field="${question.questionID}" >
            </div>
              <div style="margin-top: 20px;">
                <label for="question" style="color: #ed8f87;">问题内容:</label>
                <input type="text" id="question" name="question" th:value="${question.question}">
                </div>
                <div style="margin-top: 20px">
                <label for="sa" style="color: #ed8f87;">选项A:</label>
                <input type="text" id="sa" name="sa" th:value="${question.sa}">
                  </div>
                <div style="margin-top: 20px">
                <label for="sb" style="color: #ed8f87;">选项B:</label>
                <input type="text" id="sb" name="sb" th:value="${question.sb}">
                  </div>
                <div style="margin-top: 20px">
                <label for="sc" style="color: #ed8f87;">选项C:</label>
                <input type="text" id="sc" name="sc" th:value="${question.sc}">
                  </div>
                <div style="margin-top: 20px">
                <label for="sd" style="color: #ed8f87;">选项D:</label>
                <input type="text" id="sd" name="sd" th:value="${question.sd}">
                  </div>
                <div style="margin-top: 20px">
                <label for="correctOption" style="color: #ed8f87;">正确选项:</label>
                <input type="text" id="correctOption" name="correctOption" th:value="${question.correctOption}">
                  </div>
                <div style="margin-top: 20px">
                <label for="analysis" style="color: #ed8f87;">分析:</label>
                <textarea id="analysis" name="analysis" rows="5" th:text="${question.analysis}"></textarea>
                  </div>
                <div style="margin-top: 20px">
                <label for="score" style="color: #ed8f87;">分值:</label>
                <input type="text" id="score" name="score" th:value="${question.score}">
                  </div>
                <div style="text-align: center">
                <input type="submit" value="保存问题" class="btn btn-default tjk-an" style="width: 100px;height: 50px;">
                </div>
              </form>
              <div style="justify-content: space-between; display: flex;">
              <a th:href="@{'/questions/get/' + ${question.questionID}}" style="text-decoration: none;color: #b4eff5">问题:<label th:text="${question.questionID}"></label></a>
              <br>
              <a th:href="@{/questions/all2}" style="text-decoration: none;color: #b4eff5">返回问题列表</a>
                </div>
              <div class="col-md-2"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  </div>
</body>
</html>
